/*
 * Basic styling for the Vim gacha interface.  The design aims to evoke a
 * collectible card feel with subtle gradients and coloured borders based on
 * rarity.  The animation container shows an animated GIF while the draw is
 * processed.
 */

body {
  margin: 0;
  padding: 0;
  background-color: #f7f7f9;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#app {
  text-align: center;
  width: 90%;
  max-width: 800px;
}

h1 {
  margin-top: 0;
  font-size: 2rem;
}

p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* Card container */
#card {
  position: relative;
  width: 100%;
  min-height: 250px;
  padding: 2rem 1.5rem;
  border: 4px solid #ccc;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s;
}

/* Animation container */
#animation {
  width: 100%;
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

#animation img {
  max-width: 120px;
  max-height: 100%;
  display: none;
}

/* show placeholder during draw */
#animation.playing #anim-placeholder {
  display: inline-block;
}

/* show rarity image */
#animation.show-R #anim-r-img,
#animation.show-SR #anim-sr-img,
#animation.show-SSR #anim-ssr-img {
  display: inline-block;
  animation: pop 900ms ease-out;
}

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Rarity label */
#rarity-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Question text */
#question-text {
  display: none;
  margin-top: 1rem;
  font-size: 1.1rem;
  line-height: 1.5;
  word-break: break-word;
}

/* Draw button */
button#drawButton {
  margin-top: 1.5rem;
  padding: 0.8rem 2rem;
  font-size: 1.25rem;
  border: none;
  border-radius: 8px;
  color: #fff;
  background-color: #007bff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button#drawButton:hover:not(:disabled) {
  background-color: #005dc1;
}

button#drawButton:disabled {
  background-color: #9bbcff;
  cursor: not-allowed;
}

/* Rarity-specific styling */
.rarity-SSR {
  border-color: #d4af37;
  background: linear-gradient(135deg, #fff9e6 0%, #ffecd2 100%);
}

.rarity-SSR #rarity-label {
  color: #b8860b;
}

.rarity-SR {
  border-color: #8753a1;
  background: linear-gradient(135deg, #f5eafa 0%, #e5d6f2 100%);
}

.rarity-SR #rarity-label {
  color: #663399;
}

.rarity-R {
  border-color: #3f51b5;
  background: linear-gradient(135deg, #e6ecff 0%, #ccd9ff 100%);
}

.rarity-R #rarity-label {
  color: #2c3e97;
}